---
title: "Expo Plugin"
description: Build plugin for Expo projects. Bundles your Expo app using Expo's native export command.
icon: expo
---


## Installation

```package-install
npm install @hot-updater/expo --save-dev
```

## Configuration

```typescript
interface ExpoPluginConfig {
  outDir?: string;      // Output directory (default: "dist")
  sourcemap?: boolean;  // Generate sourcemaps (default: false)
}
```

## Usage

```typescript
import { expo } from '@hot-updater/expo';
import { defineConfig } from 'hot-updater';

export default defineConfig({
  build: expo({
    sourcemap: false
  }),
  // ... other config
});
```

## Expo Configuration

Add the plugin to your `app.json` file as shown below:

```json title="app.json"
{
  "expo": {
    "plugins": [
      [
        "@hot-updater/react-native", // [!code ++]
        { // [!code ++]
          "channel": "production" // [!code ++]
        } // [!code ++]
      ] // [!code ++]
    ]
  }
}
```

Run prebuild to apply the changes:

```package-install
npx expo prebuild
```

Run the following command to customize your Babel configuration:

```package-install
npx expo customize babel.config.js
```

Add the following to your `babel.config.js` file:

```js title="babel.config.js"
module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: [
    'hot-updater/babel-plugin', // [!code ++]
  ],
};
```

## Key Features

- Uses Expo's `expo export:embed` command
- Auto-detects Hermes from app.json configuration
- Supports both managed and bare Expo workflows
- Compatible with Expo prebuild for native builds
- Automatically configures bundler based on Expo settings
